Virtual machine placement to improve memory utilization

ABSTRACT

Virtual machines having a high amount of identical memory pages are grouped under a common hypervisor to enable greater memory savings as the result of transparent page sharing. One embodiment provides a computer program product including computer usable program code for performing a method that comprises analyzing the software image content of a plurality of virtual machines running on a plurality of hypervisors in a common migration domain, identifying two or more of the virtual machines having greater than a threshold amount of common memory pages, placing the two or more virtual machines under a common hypervisor, and sharing the common memory pages among the two or more virtual machines. Optionally, the identifying of two or more of the virtual machines may include identifying two or more of the virtual machines having the same software image content classifications; thereby, identifying images with a greater affinity for common memory pages.

BACKGROUND

1. Field of the Invention

The present invention relates to the management of virtual machines.More specifically, the present invention relates to the placement ofvirtual machines among servers to improve memory utilization.

2. Background of the Related Art

In a cloud computing environment, a user is assigned a virtual machinesomewhere in the computing cloud. The virtual machine provides thesoftware operating system and has access to physical resources, such asinput/output bandwidth, processing power and memory capacity, to supportthe user's application. Provisioning software manages and allocatesvirtual machines among the available computer nodes in the cloud.Because each virtual machine runs independent of other virtual machines,multiple operating system environments can co-exist on the same physicalcomputer in complete isolation from each other.

BRIEF SUMMARY

One embodiment of the present invention provides a computer programproduct including computer-usable program code embodied on acomputer-usable storage medium. The computer program product comprisescomputer-usable program code for analyzing the software image content ofa plurality of virtual machines running on a plurality of hypervisors ina common migration domain, computer-usable program code for identifyingtwo or more of the virtual machines having greater than a thresholdamount of common memory pages, program code for placing the two or morevirtual machines under a common hypervisor, and computer-usable programcode for sharing the common memory pages among the two or more virtualmachines. Optionally, the computer-usable program code for identifyingof two or more of the virtual machines having greater than a thresholdamount of common memory pages, may include computer-usable program codefor identifying two or more of the virtual machines having the samesoftware image content classifications which thereby have a greateraffinity for common memory pages.

BRIEF DESCRIPTION OF THE SEVERAL VIEWS OF THE DRAWINGS

FIG. 1 is a diagram of a cloud computing node according to one or moreembodiment of the present invention.

FIG. 2 is a diagram of a cloud computing environment according to one ormore embodiment of the present invention.

FIG. 3 is a diagram depicting abstraction model layers according to oneor more embodiment of the present invention.

FIG. 4 is a diagram of an exemplary computing node that may be utilizedaccording to one or more embodiments of the present invention.

FIG. 5 is a diagram of an exemplary blade chassis that may be utilizedaccording to one or more embodiments of the present invention.

FIG. 6 is a diagram of a global provisioning manager according to one ormore embodiments of the present invention.

FIGS. 7A and 7B are a diagram and a table, respectively, showing a firstplacement of virtual machines.

FIGS. 8A and 8B are a diagram and a table, respectively, showing asecond, more efficient placement of virtual machines using the samesystem resources as in FIGS. 7A and 7B.

FIG. 9 is a flowchart of a method for placing virtual machines on thebasis of software image content classifications.

FIG. 10 is a flowchart of a method for placing virtual machines on thebasis of the amount of common memory pages between two or more virtualmachines.

FIG. 11 is a flowchart of a method for optimizing virtual machineplacement in response to installation of a new hypervisor or operatingsystem.

DETAILED DESCRIPTION

One embodiment of the present invention provides a computer-implementedmethod, comprising determining a software image content classificationfor each of a plurality of virtual machines, placing virtual machineswith matching software image content classifications under a commonhypervisor, and sharing identical memory pages among the virtualmachines grouped under the common hypervisor. The term “common” is usedherein to mean “shared by two or more entities.” For example, the commonhypervisor is shared by two or more virtual machines with matchingsoftware image content classifications.

According to the method, when two or more virtual machines operatingunder a common hypervisor have a memory page that is identical, theidentical memory page(s) are shared. In one non-limiting example, thehypervisors may be x86 hypervisors having support for transparent pagesharing. Transparent page sharing is the use of identical memory pagesacross guest virtual machines. Code pages, particularly those pageswithin the operating system, are well suited for this type oftransparent sharing. One benefit of transparent page sharing is that itmay lead to improved virtual machine density on servers. This benefit isparticularly significant when the virtual machines running on the samephysical server are fairly homogenous, as will be the case with virtualmachines that are created from a common golden image with the sameoperating system. The improved virtual machine density comes fromreducing the memory required to host guests that contain common images(software stacks). This improvement in memory management may allow morevirtual machines to use the same physical server.

Placing virtual machines with matching software image contentclassifications under a common hypervisor may include the initialvirtual machine placement, dynamic virtual machine migration orplacement, or both. In a method of dynamic virtual machine placement,physical resources are scanned to determine if the virtual machines on aplurality of physical servers are optimally placed. For example, themethod may determine whether one or more virtual machines have beendynamically deallocated or whether one or more new virtual machines havebeen allocated during run time. Furthermore, the method may move acurrently running virtual machine to a different operating system orhypervisor as new operating systems or hypervisor upgrades becomeavailable. In one example, if a new operating system is installed, theSoftware Placement Organizer scans the VMs based on their imageclassification to see if they would run better on the new operatingsystem. The method improves management of virtual machine cloudresources by implementing a Software Placement Organizer that executes anew server consolidation analysis algorithm.

The software image content of a plurality of virtual machines mayoptionally be classified on the basis of a common golden image used tocreate the virtual machine. Such virtual machines are expected to have alarge amount of identical memory pages since they are created from thesame image. For example, all virtual machines that are created from thecommon golden image will have the same operating system. Sharingidentical operating system code pages across the virtual machines willalone result in significant memory savings. Furthermore, software imagecontent classifications may be used to identify and facilitate groupingof similar application programs, such as CAD programs, database searchengines, and spreadsheets, which have a greater affinity for commonsystem code pages.

At startup of a new virtual machine, the new virtual machine may beplaced on physical servers already running at least one virtual machinewith an image stack that is similar in the sense that there are manyidentical memory pages. This method has particular affinity in cloudcomputing, where virtual machine images are created from a commonrepository. The common repository may have a set of golden master imagesthat are not identical, but the virtual machines that are conceived froma common golden master image may be grouped together on a singlephysical server and a common hypervisor. This method allows additionalvirtual machines to be allocated on the same server because of theefficient use of common pages in memory across multiple similar guests.Likewise, as virtual machines are started and terminated depending onworkloads, virtual machines with common image contents can be migrateddynamically to servers with virtual machines having an image contentcommonality. The common memory pages may include code pages, such as thecode pages of an operating system.

The method may further include consolidating a standalone workloadrunning on a first physical server to a second physical server running ahypervisor. For example, based on the software image contentclassification of a standalone workload, a Server ConsolidationAssessment tool running on the global provisioning manager could movethe standalone workload to a physical server that is running ahypervisor. The benefit of this move would be higher serverconsolidation ratios regardless of whether or not the hypervisor isimplementing automated dynamic migration.

Another embodiment of the present invention provides acomputer-implemented method, comprising analyzing the software imagecontent of a plurality of virtual machines running on a plurality ofhypervisors in a common migration domain, identifying two or more of thevirtual machines having greater than a threshold amount of identicalmemory pages, placing the two or more virtual machines under a commonhypervisor, and sharing the common memory pages among the two or morevirtual machines. Optionally, the two or more virtual machines may beplaced under a common hypervisors by dynamically migrating a first ofthe two or more virtual machines from a first physical server to asecond physical server that is already running a second of the two ormore virtual machines.

The amount of image ID occurrence between a first virtual machine and asecond virtual machine may be increased, for example, by moving aworkload of the first virtual machine from a first operating system to asecond operating system that is used by the workload of the secondvirtual machine. In one embodiment, a software placement organizer (SPO)dynamically analyzes workloads that are either running in a virtualmachine or on a physical server and determines the benefit of moving oneor more identified workloads to a newer version of the operating system.Specifically, the software placement organizer may determine the amountof identical memory pages that two virtual machines could share if theyhad the same operating system, as compared to the current amount ofidentical memory pages between the two virtual machines. If there aresignificant potential memory savings resulting from changing theoperating system, then the operating system may be changed automaticallyor an output may be generated to prompt a user to authorized and/orinstall the new operating system. An analysis tool could discover allrunning workloads and specifically looking for applications that areinstalled on different operating systems. The software could make OSupgrade suggestions and estimate the potential server utilizationbenefits. This would work for both workloads running on physical serversas well as within virtual machines. In one variation of the method,different versions of the same operating system may be considered to bedifferent operating systems, since two virtual machines running the sameversion of the operating system will be able to share a greater amountof memory pages.

It should be recognized that the target physical server identified toreceive an additional virtual machine or run a virtual machine with anupgraded operating system may be required to have additional attributesto satisfy additional aspects of a virtual machine management ormigration policy. Such virtual machine management policies may assurethat the migration results in a net benefit, rather than merely avoidingone limitation only to raise another. For example, it is expected that avirtual machine will only be migrated if the target physical server isfurther determined to have sufficient memory and CPU bandwidth availableto run the virtual machine. Both of these attributes can be determinedin the virtualization management space. In addition, the target physicalserver must be within the migration domain of the source physicalserver, and fit within all existing migration policies enabled by themanagement controller, such as security based dynamic migration policiesand high availability migration sub-domains.

It should be understood that although this disclosure is applicable tocloud computing, implementations of the teachings recited herein are notlimited to a cloud computing environment. Rather, embodiments of thepresent invention are capable of being implemented in conjunction withany other type of computing environment now known or later developed.

Cloud computing is a model of service delivery for enabling convenient,on-demand network access to a shared pool of configurable computingresources (e.g. networks, network bandwidth, servers, processing,memory, storage, applications, virtual machines, and services) that canbe rapidly provisioned and released with minimal management effort orinteraction with a provider of the service. This cloud model may includeat least five characteristics, at least three service models, and atleast four deployment models.

Characteristics are as follows:

On-demand self-service: a cloud consumer can unilaterally provisioncomputing capabilities, such as server time and network storage, asneeded automatically without requiring human interaction with theservice's provider.

Broad network access: capabilities are available over a network andaccessed through standard mechanisms that promote use by heterogeneousthin or thick client platforms (e.g., mobile phones, laptops, and PDAs).

Resource pooling: the provider's computing resources are pooled to servemultiple consumers using a multi-tenant model, with different physicaland virtual resources dynamically assigned and reassigned according todemand. There is a sense of location independence in that the consumergenerally has no control or knowledge over the exact location of theprovided resources but may be able to specify location at a higher levelof abstraction (e.g., country, state, or datacenter).

Rapid elasticity: capabilities can be rapidly and elasticallyprovisioned, in some cases automatically, to quickly scale out andrapidly released to quickly scale in. To the consumer, the capabilitiesavailable for provisioning often appear to be unlimited and can bepurchased in any quantity at any time.

Measured service: cloud systems automatically control and optimizeresource use by leveraging a metering capability at some level ofabstraction appropriate to the type of service (e.g., storage,processing, bandwidth, and active user accounts). Resource usage can bemonitored, controlled, and reported providing transparency for both theprovider and consumer of the utilized service.

Service Models are as follows:

Software as a Service (SaaS): the capability provided to the consumer isto use the provider's applications running on a cloud infrastructure.The applications are accessible from various client devices through athin client interface such as a web browser (e.g., web-based e-mail).The consumer does not manage or control the underlying cloudinfrastructure including network, servers, operating systems, storage,or even individual application capabilities, with the possible exceptionof limited user-specific application configuration settings.

Platform as a Service (PaaS): the capability provided to the consumer isto deploy onto the cloud infrastructure consumer-created or acquiredapplications created using programming languages and tools supported bythe provider. The consumer does not manage or control the underlyingcloud infrastructure including networks, servers, operating systems, orstorage, but has control over the deployed applications and possiblyapplication hosting environment configurations.

Infrastructure as a Service (IaaS): the capability provided to theconsumer is to provision processing, storage, networks, and otherfundamental computing resources where the consumer is able to deploy andrun arbitrary software, which can include operating systems andapplications. The consumer does not manage or control the underlyingcloud infrastructure but has control over operating systems, storage,deployed applications, and possibly limited control of select networkingcomponents (e.g., host firewalls).

Deployment Models are as follows:

Private cloud: the cloud infrastructure is operated solely for anorganization. It may be managed by the organization or a third party andmay exist on-premises or off-premises.

Community cloud: the cloud infrastructure is shared by severalorganizations and supports a specific community that has shared concerns(e.g., mission, security requirements, policy, and complianceconsiderations). It may be managed by the organizations or a third partyand may exist on-premises or off-premises.

Public cloud: the cloud infrastructure is made available to the generalpublic or a large industry group and is owned by an organization sellingcloud services.

Hybrid cloud: the cloud infrastructure is a composition of two or moreclouds (private, community, or public) that remain unique entities butare bound together by standardized or proprietary technology thatenables data and application portability (e.g., cloud bursting forload-balancing between clouds).

A cloud computing environment is service oriented with a focus onstatelessness, low coupling, modularity, and semantic interoperability.At the heart of cloud computing is an infrastructure comprising anetwork of interconnected nodes.

Referring now to FIG. 1, a schematic of an example of a cloud computingnode is shown. Cloud computing node 10 is only one example of a suitablecloud computing node and is not intended to suggest any limitation as tothe scope of use or functionality of embodiments of the inventiondescribed herein. Regardless, cloud computing node 10 is capable ofbeing implemented and/or performing any of the functionality set forthhereinabove.

In cloud computing node 10 there is a computer system/server 12, whichis operational with numerous other general purpose or special purposecomputing system environments or configurations. Examples of well-knowncomputing systems, environments, and/or configurations that may besuitable for use with computer system/server 12 include, but are notlimited to, personal computer systems, server computer systems, thinclients, thick clients, hand-held or laptop devices, multiprocessorsystems, microprocessor-based systems, set top boxes, programmableconsumer electronics, network PCs, minicomputer systems, mainframecomputer systems, and distributed cloud computing environments thatinclude any of the above systems or devices, and the like.

Computer system/server 12 may be described in the general context ofcomputer system-executable instructions, such as program modules, beingexecuted by a computer system. Generally, program modules may includeroutines, programs, objects, components, logic, data structures, and soon that perform particular tasks or implement particular abstract datatypes. Computer system/server 12 may be practiced in distributed cloudcomputing environments where tasks are performed by remote processingdevices that are linked through a communications network. In adistributed cloud computing environment, program modules may be locatedin both local and remote computer system storage media including memorystorage devices.

As shown in FIG. 1, computer system/server 12 in cloud computing node 10is shown in the form of a general-purpose computing device. Thecomponents of computer system/server 12 may include, but are not limitedto, one or more processors or processing units 16, a system memory 28,and a bus 18 that couples various system components including systemmemory 28 to processor 16.

Bus 18 represents one or more of any of several types of bus structures,including a memory bus or memory controller, a peripheral bus, anaccelerated graphics port, and a processor or local bus using any of avariety of bus architectures. By way of example, and not limitation,such architectures include Industry Standard Architecture (ISA) bus,Micro Channel Architecture (MCA) bus, Enhanced ISA (EISA) bus, VideoElectronics Standards Association (VESA) local bus, and PeripheralComponent Interconnects (PCI) bus.

Computer system/server 12 typically includes a variety of computersystem readable media. Such media may be any available media that isaccessible by computer system/server 12, and it includes both volatileand non-volatile media, removable and non-removable media.

System memory 28 can include computer system readable media in the formof volatile memory, such as random access memory (RAM) 30 and/or cachememory 32. Computer system/server 12 may further include otherremovable/non-removable, volatile/non-volatile computer system storagemedia. By way of example only, storage system 34 can be provided forreading from and writing to a non-removable, non-volatile magnetic media(not shown and typically called a “hard drive”). Although not shown, amagnetic disk drive for reading from and writing to a removable,non-volatile magnetic disk (e.g., a “floppy disk”), and an optical diskdrive for reading from or writing to a removable, non-volatile opticaldisk such as a CD-ROM, DVD-ROM or other optical media can be provided.In such instances, each can be connected to bus 18 by one or more datamedia interfaces. As will be further depicted and described below,memory 28 may include at least one program product having a set (e.g.,at least one) of program modules that are configured to carry out thefunctions of embodiments of the invention.

Program/utility 40, having a set (at least one) of program modules 42,may be stored in memory 28 by way of example, and not limitation, aswell as an operating system, one or more application programs, otherprogram modules, and program data. Each of the operating system, one ormore application programs, other program modules, and program data orsome combination thereof, may include an implementation of a networkingenvironment. Program modules 42 generally carry out the functions and/ormethodologies of embodiments of the invention as described herein.

Computer system/server 12 may also communicate with one or more externaldevices 14 such as a keyboard, a pointing device, a display 24, etc.;one or more devices that enable a user to interact with computersystem/server 12; and/or any devices (e.g., network card, modem, etc.)that enable computer system/server 12 to communicate with one or moreother computing devices. Such communication can occur via Input/Output(I/O) interfaces 22. Still yet, computer system/server 12 cancommunicate with one or more networks such as a local area network(LAN), a general wide area network (WAN), and/or a public network (e.g.,the Internet) via network adapter 20. As depicted, network adapter 20communicates with the other components of computer system/server 12 viabus 18. It should be understood that although not shown, other hardwareand/or software components could be used in conjunction with computersystem/server 12. Examples, include, but are not limited to: microcode,device drivers, redundant processing units, external disk drive arrays,RAID systems, tape drives, and data archival storage systems, etc.

Referring now to FIG. 2, an illustrative cloud computing environment 50is depicted. As shown, the cloud computing environment 50 comprises oneor more cloud computing nodes 10 with which local computing devices usedby cloud consumers, such as, for example, personal digital assistant(PDA) or cellular telephone 54A, desktop computer 54B, laptop computer54C, and/or automobile computer system 54N may communicate. Nodes 10 maycommunicate with one another. They may be grouped (not shown) physicallyor virtually, in one or more networks, such as Private, Community,Public, or Hybrid clouds as described hereinabove, or a combinationthereof. This allows cloud computing environment 50 to offerinfrastructure, platforms and/or software as services for which a cloudconsumer does not need to maintain resources on a local computingdevice. It is understood that the types of computing devices 54A-N shownin FIG. 2 are intended to be illustrative only and that computing nodes10 and cloud computing environment 50 can communicate with any type ofcomputerized device over any type of network and/or network addressableconnection (e.g., using a web browser).

Referring now to FIG. 3, a set of functional abstraction layers providedby cloud computing environment 50 (Shown in FIG. 2) is shown. It shouldbe understood in advance that the components, layers, and functionsshown in FIG. 3 are intended to be illustrative only and embodiments ofthe invention are not limited thereto. As depicted, the following layersand corresponding functions are provided:

Hardware and software layer 60 includes hardware and softwarecomponents. Examples of hardware components include mainframes, in oneexample IBM® zSeries® systems; RISC (Reduced Instruction Set Computer)architecture based servers, in one example IBM pSeries® systems; IBMxSeries® systems; IBM BladeCenter® systems; storage devices; networksand networking components. Examples of software components includenetwork application server software, in one example IBM WebSphere®application server software; and database software, in one example IBMDB2® database software. (IBM, zSeries, pSeries, xSeries, BladeCenter,WebSphere, and DB2 are trademarks of International Business MachinesCorporation registered in many jurisdictions worldwide).

Virtualization layer 62 provides an abstraction layer from which thefollowing examples of virtual entities may be provided: virtual servers;virtual storage; virtual networks, including virtual private networks;virtual applications and operating systems; and virtual clients.

In one example, management layer 64 may provide the functions describedbelow. Resource provisioning provides dynamic procurement of computingresources and other resources that are utilized to perform tasks withinthe cloud computing environment. Metering and Pricing provide costtracking as resources are utilized within the cloud computingenvironment, and billing or invoicing for consumption of theseresources. In one example, these resources may comprise applicationsoftware licenses. Security provides identity verification for cloudconsumers and tasks, as well as protection for data and other resources.User portal provides access to the cloud computing environment forconsumers and system administrators. Service level management providescloud computing resource allocation and management such that requiredservice levels are met. Service Level Agreement (SLA) planning andfulfillment provides pre-arrangement for, and procurement of, cloudcomputing resources for which a future requirement is anticipated inaccordance with an SLA.

Workloads layer 66 provides examples of functionality for which thecloud computing environment may be utilized. Examples of workloads andfunctions which may be provided from this layer include: mapping andnavigation; software development and lifecycle management; virtualclassroom education delivery; data analytics processing; and transactionprocessing.

FIG. 4 depicts an exemplary computing node (or simply “computer”) 102that may be utilized in accordance with one or more embodiments of thepresent invention. Note that some or all of the exemplary architecture,including both depicted hardware and software, shown for and withincomputer 102 may be utilized by the software deploying server 150, aswell as the provisioning manager/management node 222 and the serverblades 204 a-n shown in FIG. 5. Note that while the server bladesdescribed in the present disclosure are described and depicted inexemplary manner as server blades in a blade chassis, some or all of thecomputers described herein may be stand-alone computers, servers, orother integrated or stand-alone computing devices. Thus, the terms“blade,” “server blade,” “computer,” and “server” are usedinterchangeably in the present descriptions.

Computer 102 includes a processor unit 104 that is coupled to a systembus 106. Processor unit 104 may utilize one or more processors, each ofwhich has one or more processor cores. A video adapter 108, whichdrives/supports a display 110, is also coupled to system bus 106. In oneembodiment, a switch 107 couples the video adapter 108 to the system bus106. Alternatively, the switch 107 may couple the video adapter 108 tothe display 110. In either embodiment, the switch 107 is a switch,preferably mechanical, that allows the display 110 to be coupled to thesystem bus 106, and thus to be functional only upon execution ofinstructions (e.g., virtual machine provisioning program—VMPP 148described below) that support the processes described herein.

System bus 106 is coupled via a bus bridge 112 to an input/output (I/O)bus 114. An I/O interface 116 is coupled to I/O bus 114. I/O interface116 affords communication with various I/O devices, including a keyboard118, a mouse 120, a media tray 122 (which may include storage devicessuch as CD-ROM drives, multi-media interfaces, etc.), a printer 124, and(if a VHDL chip 137 is not utilized in a manner described below),external USB port(s) 126. While the format of the ports connected to I/Ointerface 116 may be any known to those skilled in the art of computerarchitecture, in a preferred embodiment some or all of these ports areuniversal serial bus (USB) ports.

As depicted, computer 102 is able to communicate with a softwaredeploying server 150 via network 128 using a network interface 130.Network 128 may be an external network such as the Internet, or aninternal network such as an Ethernet or a virtual private network (VPN).

A hard drive interface 132 is also coupled to system bus 106. Hard driveinterface 132 interfaces with a hard drive 134. In a preferredembodiment, hard drive 134 populates a system memory 136, which is alsocoupled to system bus 106. System memory is defined as a lowest level ofvolatile memory in computer 102. This volatile memory includesadditional higher levels of volatile memory (not shown), including, butnot limited to, cache memory, registers and buffers. Data that populatessystem memory 136 includes computer 102's operating system (OS) 138 andapplication programs 144.

The operating system 138 includes a shell 140, for providing transparentuser access to resources such as application programs 144. Generally,shell 140 is a program that provides an interpreter and an interfacebetween the user and the operating system. More specifically, shell 140executes commands that are entered into a command line user interface orfrom a file. Thus, shell 140, also called a command processor, isgenerally the highest level of the operating system software hierarchyand serves as a command interpreter. The shell provides a system prompt,interprets commands entered by keyboard, mouse, or other user inputmedia, and sends the interpreted command(s) to the appropriate lowerlevels of the operating system (e.g., a kernel 142) for processing. Notethat while shell 140 is a text-based, line-oriented user interface, thepresent invention will equally well support other user interface modes,such as graphical, voice, gestural, etc.

As depicted, OS 138 also includes kernel 142, which includes lowerlevels of functionality for OS 138, including providing essentialservices required by other parts of OS 138 and application programs 144,including memory management, process and task management, diskmanagement, and mouse and keyboard management.

Application programs 144 include a renderer, shown in exemplary manneras a browser 146. Browser 146 includes program modules and instructionsenabling a world wide web (WWW) client (i.e., computer 102) to send andreceive network messages to the Internet using hypertext transferprotocol (HTTP) messaging, thus enabling communication with softwaredeploying server 150 and other described computer systems.

Application programs 144 in the system memory of computer 102 (as wellas the system memory of the software deploying server 150) also includea virtual machine provisioning program (VMPP) 148. VMPP 148 includescode for implementing the processes described below, including thosedescribed in FIGS. 2-8. VMPP 148 is able to communicate with a vitalproduct data (VPD) table 151, which provides required VPD data describedbelow. In one embodiment, the computer 102 is able to download VMPP 148from software deploying server 150, including in an on-demand basis.Note further that, in one embodiment of the present invention, softwaredeploying server 150 performs all of the functions associated with thepresent invention (including execution of VMPP 148), thus freeingcomputer 102 from having to use its own internal computing resources toexecute VMPP 148.

Also stored in the system memory 136 is a VHDL (VHSIC hardwaredescription language) program 139. VHDL is an exemplary design-entrylanguage for field programmable gate arrays (FPGAs), applicationspecific integrated circuits (ASICs), and other similar electronicdevices. In one embodiment, execution of instructions from VMPP 148causes the VHDL program 139 to configure the VHDL chip 137, which may bean FPGA, ASIC, or the like.

In another embodiment of the present invention, execution ofinstructions from VMPP 148 results in a utilization of VHDL program 139to program a VHDL emulation chip 151. VHDL emulation chip 151 mayincorporate a similar architecture as described above for VHDL chip 137.Once VMPP 148 and VHDL program 139 program VHDL emulation chip 151, VHDLemulation chip 151 performs, as hardware, some or all functionsdescribed by one or more executions of some or all of the instructionsfound in VMPP 148. That is, the VHDL emulation chip 151 is a hardwareemulation of some or all of the software instructions found in VMPP 148.In one embodiment, VHDL emulation chip 151 is a programmable read onlymemory (PROM) that, once burned in accordance with instructions fromVMPP 148 and VHDL program 139, is permanently transformed into a newcircuitry that performs the functions needed to perform the processes ofthe present invention.

The hardware elements depicted in computer 102 are not intended to beexhaustive, but rather are representative to highlight essentialcomponents required by the present invention. For instance, computer 102may include alternate memory storage devices such as magnetic cassettes,digital versatile disks (DVDs), Bernoulli cartridges, and the like.These and other variations are intended to be within the spirit andscope of the present invention.

A cloud computing environment allows a user workload to be assigned to avirtual machine (VM) somewhere in the computing cloud. This virtualmachine provides the software operating system and physical resourcessuch as processing power and memory to support the user's applicationworkload. The present disclosure describes methods for placing virtualmachines among physical servers based on an image content classificationor the amount of identical memory pages between two virtual machines.

FIG. 5 depicts an exemplary blade chassis that may be utilized inaccordance with one or more embodiments of the present invention. Theexemplary blade chassis 202 may operate in a “cloud” environment toprovide a pool of resources. Blade chassis 202 comprises a plurality ofblades 204 a-n (where “a-n” indicates an integer number of blades)coupled to a chassis backbone 206. Each blade supports one or morevirtual machines (VMs). As known to those skilled in the art ofcomputers, a VM is a software implementation (emulation) of a physicalcomputer. A single hardware computer (blade) can support multiple VMs,each running the same, different, or shared operating systems. In oneembodiment, each VM can be specifically tailored and reserved forexecuting software tasks 1) of a particular type (e.g., databasemanagement, graphics, word processing etc.); 2) for a particular user,subscriber, client, group or other entity; 3) at a particular time ofday or day of week (e.g., at a permitted time of day or schedule); etc.

As depicted in FIG. 5, blade 204 a supports VMs 208 a-n (where “a-n”indicates an integer number of VMs), and blade 204 n supports VMs 210a-n (wherein “a-n” indicates an integer number of VMs). Blades 204 a-nare coupled to a storage device 212 that provides a hypervisor 214,guest operating systems, and applications for users (not shown).Provisioning software from the storage device 212 allocates boot storagewithin the storage device 212 to contain the maximum number of guestoperating systems, and associates applications based on the total amountof storage (such as that found within storage device 212) within thecloud. For example, support of one guest operating system and itsassociated applications may require 1 GByte of physical memory storagewithin storage device 212 to store the application, and another 1 GByteof memory space within storage device 212 to execute that application.If the total amount of memory storage within a physical server, such asboot storage device 212, is 64 GB, the provisioning software assumesthat the physical server can support 32 virtual machines. Thisapplication can be located remotely in the network 216 and transmittedfrom the network attached storage 217 to the storage device 212 over thenetwork. The global provisioning manager 232 running on the remotemanagement node (Director Server) 230 performs this task. In thisembodiment, the computer hardware characteristics are communicated fromthe VPD 151 to the VMPP 148. The VMPP 148 communicates the computerphysical characteristics to the blade chassis provisioning manager 222,to the management interface 220, and to the global provisioning manager232 running on the remote management node (Director Server) 230.

Note that chassis backbone 206 is also coupled to a network 216, whichmay be a public network (e.g., the Internet), a private network (e.g., avirtual private network or an actual internal hardware network), etc.Network 216 permits a virtual machine workload 218 to be communicated toa management interface 220 of the blade chassis 202. This virtualmachine workload 218 is a software task whose execution, on any of theVMs within the blade chassis 202, is to request and coordinatedeployment of workload resources with the management interface 220. Themanagement interface 220 then transmits this workload request to aprovisioning manager/management node 222, which is hardware and/orsoftware logic capable of configuring VMs within the blade chassis 202to execute the requested software task. In essence the virtual machineworkload 218 manages the overall provisioning of VMs by communicatingwith the blade chassis management interface 220 and provisioningmanagement node 222. Then this request is further communicated to theVMPP 148 in the computer system. Note that the blade chassis 202 is anexemplary computer environment in which the presently disclosed methodscan operate. The scope of the presently disclosed system should not belimited to a blade chassis, however. That is, the presently disclosedmethods can also be used in any computer environment that utilizes sometype of workload management or resource provisioning, as describedherein. Thus, the terms “blade chassis,” “computer chassis,” and“computer environment” are used interchangeably to describe a computersystem that manages multiple computers/blades/servers.

FIG. 6 is a diagram of the global provisioning manager 232 according toone or more embodiments of the present invention. The globalprovisioning manager 232 makes more efficient use of the physical memoryresource of each server (See blade servers 204 a-n in FIG. 5) byimplementing a Software Placement Organizer 240. The Software PlacementOptimizer creates an Image Classification Table for each hypervisorwithin the cloud, as illustrated by the three Image ClassificationTables 250 a-c corresponding to three servers that each have ahypervisor. The Image Classification Tables include an entry for eachvirtual machine, where each entry may be indexed by an imageclassification ID (see column 252) and include virtual machine ID (seecolumn 254). Data structures other than a table might also be used.

Image classification could be performed dynamically, or more preferablyin association with creating the virtual machine image. For example, asa virtual machine is created, the virtual machine could be classifiedaccording to the Golden Master from which the virtual machine wascloned. This classification model fits well into the cloud computingparadigm where all VMs are created from a set of Golden Images within anenterprise wide repository. In an alternative embodiment, the ImageClassification Table may provide data regarding the amount of identicalmemory pages that exist between any two virtual machines.

An Image Management Module 242 then creates and manages all virtualmachine images across all of the servers in the migration domain. Atvirtual machine creation, all VMs are classified, and given an imageclassification ID by the Image Management Module. In previous systems,virtual machines were randomly allocated to a physical server that hadsufficient CPU and memory bandwidth to house this image. However, theSoftware Placement Organizer 240 running in conjunction with the ImageManagement Module 242 has awareness of the image classification ID forall of the virtual machines. A Software Placement Optimizer 244 scansthe Image Classification Tables for all hypervisors (i.e., Tables 250a-c), then determines an appropriate target server/hypervisor for thenewly created virtual machine based on the highest image ID occurrenceof the virtual machine, as well as the availability of memory capacityand CPU bandwidth on the servers within the system pool. Atinitialization, the Software Placement Organizer 240 groups the imagesbased on their image classification ID and records these allocations ina table. Due to the commonality of software across identical virtualmachine, more virtual machines can be allocated in the same physicalmemory space.

FIGS. 7A and 7B are a diagram and a table, respectively, showing a firstplacement of virtual machines. In the diagram of FIG. 7A, multiplevirtual machines are shown having been placed under each of thehypervisors running on the three physical servers (#1, #2 and #3). Thevirtual machines are illustrated as circles, wherein the diameter ofeach circle indicates its image classification ID. Without benefit ofthe present invention, each physical server has at least one virtualmachine with each of three image classification IDs. In the table ofFIG. 7B, those same virtual machines are listed in association with thephysical server on which it is placed. Although the image classificationID may take many forms, it is illustrated here by the circle diameterand an image size. By multiplying the image size of each class by thenumber of virtual machines in that class allocated to the particularphysical server, the total memory usage may be calculated. Assuming inthis example that each physical server has 20 GB of memory, theremaining memory is shown in the last column.

FIGS. 8A and 8B are a diagram and a table, respectively, showing asecond, more efficient placement of virtual machines using the samesystem resources as in FIGS. 7A and 7B. With the benefit of the methodsof the present invention, the same set of virtual machines shown in FIG.7A are now placed or grouped in FIG. 8A so that virtual machines in thesame classification are now running under a common hypervisor.Specifically as shown in FIG. 8A, there are eight (8) virtual machinesof the 2 GB class running under the hypervisor on physical server #1,four (4) virtual machines of the 4 GB class running under the hypervisoron physical server #2, and six (6) virtual machines of the 2 GB classrunning under the hypervisor on physical server #3.

The implementation of FIG. 7A may incorporate and benefit fromtransparent page sharing even without the use of the present invention.However, the implementation of FIG. 8A in accordance with the placementmethods of the present invention will result in more efficient use ofthe available memory since the virtual machines on a each physicalserver have the same image classification ID and, therefore, a greateramount of identical memory pages.

8B is a table showing that, as a result of the more efficient placementof virtual machines in FIG. 8A, the same system resources as in FIGS. 7Aand 7B may be used to host additional virtual machines. Specifically,assuming the same 20 GB of memory per physical server and assuming acertain marginal reduction in memory used per virtual machine (i.e., a 1GB memory reduction for each VM in the 4 GB class, a 1.1 GB memoryreduction for each VM in the 3 GB class, and a 750 MB memory reductionfor each VM in the 2 GB class), it is now possible for (1) physicalserver #1 to run twelve (12) virtual machines in the 2 GB class with 5GB memory remaining, (2) physical server #2 to run six (6) virtualmachines in the 4 GB class with 2 GB memory remaining, and physicalserver #3 to run ten (10) virtual machines in the 3 GB class with 1 GBmemory remaining. Accordingly, the methods of the present invention mayallow twenty-eight (28) virtual machines to run on the same threephysical servers that previously ran only eighteen (18) virtualmachines.

FIG. 9 is a flowchart of a method 260 for placing virtual machines onthe basis of software image content classifications. In step 262, themethod determines a software image content classification for each of aplurality of virtual machines. In step 264, the method places virtualmachines that have matching software image content classifications undera common hypervisor. In step 266, the method shares common memory pagesamong the virtual machines that are grouped under the common hypervisor.

FIG. 10 is a flowchart of a method 270 for placing virtual machines onthe basis of the amount of common memory pages between two or morevirtual machines. In step 272, the method analyzes the software imagecontent of a plurality of virtual machines running on a plurality ofhypervisors in a common migration domain. In step 274, the methodidentifies two or more of the virtual machines having greater than athreshold amount of common memory pages. In step 276, the method placesthe two or more virtual machines under a common hypervisor. In step 278,the method shares the common memory pages among the two or more virtualmachines.

FIG. 11 is a flowchart of a method 280 for optimizing virtual machineplacement in response to installation of a new hypervisor or operatingsystem. The method begins when step 282 makes a positive determinationthat there has been an installation of a new hypervisor or a newoperating system. Typically, the new hypervisor or new operating systemwill be a new version of the existing hypervisor software or operatingsystem that provides enhancements and new features. In step 284,enhancements associated with the new hypervisor or new operating systemare identified as they relate to certain virtual machines. The SoftwarePlacement Optimizer then scans for software image contentclassifications in step 286, before correlating the software imagecontent classifications with a hypervisor in step 288. If the SoftwarePlacement Optimizer is unable to re-optimize the current virtual machineplacement, then no further action is taken and the method returns tostep 282. However, if the Software Placement Optimizer can re-optimizethe current virtual machine placement, then this is performed in step292 before the method returns to step 282.

As will be appreciated by one skilled in the art, aspects of the presentinvention may be embodied as a system, method or computer programproduct. Accordingly, aspects of the present invention may take the formof an entirely hardware embodiment, an entirely software embodiment(including firmware, resident software, micro-code, etc.) or anembodiment combining software and hardware aspects that may allgenerally be referred to herein as a “circuit,” “module” or “system.”Furthermore, aspects of the present invention may take the form of acomputer program product embodied in one or more computer-readablemedium(s) having computer-readable program code embodied thereon.

Any combination of one or more computer-readable medium(s) may beutilized. The computer-readable medium may be a computer-readable signalmedium or a computer-readable storage medium. A computer-readablestorage medium may be, for example, but not limited to, an electronic,magnetic, optical, electromagnetic, infrared, or semiconductor system,apparatus, or device, or any suitable combination of the foregoing. Morespecific examples (a non-exhaustive list) of the computer-readablestorage medium would include the following: an electrical connectionhaving one or more wires, a portable computer diskette, a hard disk, arandom access memory (RAM), a read-only memory (ROM), an erasableprogrammable read-only memory (EPROM or Flash memory), an optical fiber,a portable compact disc read-only memory (CD-ROM), an optical storagedevice, a magnetic storage device, or any suitable combination of theforegoing. In the context of this document, a computer-readable storagemedium may be any tangible medium that can contain, or store a programfor use by or in connection with an instruction execution system,apparatus, or device.

A computer-readable signal medium may include a propagated data signalwith computer-readable program code embodied therein, for example, inbaseband or as part of a carrier wave. Such a propagated signal may takeany of a variety of forms, including, but not limited to,electro-magnetic, optical, or any suitable combination thereof. Acomputer-readable signal medium may be any computer-readable medium thatis not a computer-readable storage medium and that can communicate,propagate, or transport a program for use by or in connection with aninstruction execution system, apparatus, or device.

Program code embodied on a computer-readable medium may be transmittedusing any appropriate medium, including but not limited to wireless,wireline, optical fiber cable, RF, etc., or any suitable combination ofthe foregoing. Computer program code for carrying out operations foraspects of the present invention may be written in any combination ofone or more programming languages, including an object orientedprogramming language such as Java, Smalltalk, C++ or the like andconventional procedural programming languages, such as the “C”programming language or similar programming languages. The program codemay execute entirely on the user's computer, partly on the user'scomputer, as a stand-alone software package, partly on the user'scomputer and partly on a remote computer or entirely on the remotecomputer or server. In the latter scenario, the remote computer may beconnected to the user's computer through any type of network, includinga local area network (LAN) or a wide area network (WAN), or theconnection may be made to an external computer (for example, through theInternet using an Internet Service Provider).

Aspects of the present invention are described below with reference toflowchart illustrations and/or block diagrams of methods, apparatus(systems) and computer program products according to embodiments of theinvention. It will be understood that each block of the flowchartillustrations and/or block diagrams, and combinations of blocks in theflowchart illustrations and/or block diagrams, can be implemented bycomputer program instructions. These computer program instructions maybe provided to a processor of a general-purpose computer,special-purpose computer, or other programmable data processingapparatus to produce a machine, such that the instructions, whichexecute via the processor of the computer or other programmable dataprocessing apparatus, create means for implementing the functions/actsspecified in the flowchart and/or block diagram block or blocks.

These computer program instructions may also be stored in acomputer-readable medium that can direct a computer, other programmabledata processing apparatus, or other devices to function in a particularmanner, such that the instructions stored in the computer-readablemedium produce an article of manufacture including instructions whichimplement the function/act specified in the flowchart and/or blockdiagram block or blocks.

The computer program instructions may also be loaded onto a computer,other programmable data processing apparatus, or other devices to causea series of operational steps to be performed on the computer, otherprogrammable apparatus or other devices to produce a computerimplemented process such that the instructions which execute on thecomputer or other programmable apparatus provide processes forimplementing the functions/acts specified in the flowchart and/or blockdiagram block or blocks.

The flowchart and block diagrams in the Figures illustrate thearchitecture, functionality, and operation of possible implementationsof systems, methods and computer program products according to variousembodiments of the present invention. In this regard, each block in theflowchart or block diagrams may represent a module, segment, or portionof code, which comprises one or more executable instructions forimplementing the specified logical function(s). It should also be notedthat, in some alternative implementations, the functions noted in theblock may occur out of the order noted in the figures. For example, twoblocks shown in succession may, in fact, be executed substantiallyconcurrently, or the blocks may sometimes be executed in the reverseorder, depending upon the functionality involved. It will also be notedthat each block of the block diagrams and/or flowchart illustration, andcombinations of blocks in the block diagrams and/or flowchartillustration, can be implemented by special purpose hardware-basedsystems that perform the specified functions or acts, or combinations ofspecial purpose hardware and computer instructions.

The terminology used herein is for the purpose of describing particularembodiments only and is not intended to be limiting of the invention. Asused herein, the singular forms “a”, “an” and “the” are intended toinclude the plural forms as well, unless the context clearly indicatesotherwise. It will be further understood that the terms “comprises”and/or “comprising,” when used in this specification, specify thepresence of stated features, integers, steps, operations, elements,components and/or groups, but do not preclude the presence or additionof one or more other features, integers, steps, operations, elements,components, and/or groups thereof. The terms “preferably,” “preferred,”“prefer,” “optionally,” “may,” and similar terms are used to indicatethat an item, condition or step being referred to is an optional (notrequired) feature of the invention.

The corresponding structures, materials, acts, and equivalents of allmeans or steps plus function elements in the claims below are intendedto include any structure, material, or act for performing the functionin combination with other claimed elements as specifically claimed. Thedescription of the present invention has been presented for purposes ofillustration and description, but it is not intended to be exhaustive orlimited to the invention in the form disclosed. Many modifications andvariations will be apparent to those of ordinary skill in the artwithout departing from the scope and spirit of the invention. Theembodiment was chosen and described in order to best explain theprinciples of the invention and the practical application, and to enableothers of ordinary skill in the art to understand the invention forvarious embodiments with various modifications as are suited to theparticular use contemplated.

What is claimed is:
 1. A computer program product includingcomputer-usable program code embodied on a non-transitorycomputer-usable storage medium, the computer program product comprising:computer-usable program code for analyzing the software image content ofa plurality of virtual machines running on a plurality of hypervisors ina common migration domain; computer-usable program code for identifyingtwo or more of the virtual machines having greater than a thresholdamount of common memory pages; computer-usable program code for placingthe two or more virtual machines under a common hypervisor;computer-usable program code for increasing the amount of common memorypages between a first virtual machine and a second virtual machine bymoving a workload of the first virtual machine from a first operatingsystem to a second operating system that is used by the workload of thesecond virtual machine; and computer-usable program code for sharing thecommon memory pages among the two or more virtual machines.
 2. Thecomputer program product of claim 1, wherein the computer-usable programcode for placing the two or more virtual machines under a commonhypervisor, includes computer-usable program code for dynamicallymigrating a first of the two or more virtual machines to a physicalserver running a second of the two or more virtual machines.
 3. Thecomputer program product of claim 1, wherein the computer-usable programcode for analyzing the software image content of a plurality of virtualmachines running on a plurality of hypervisors in a common migrationdomain, includes computer-usable program code for determining a softwareimage content classification for each of the plurality of virtualmachines.
 4. The computer program product of claim 3, wherein thecomputer-usable program code for identifying two or more of the virtualmachines having greater than a threshold amount of common memory pages,includes computer usable computer-usable program code for identifyingtwo or more of the virtual machines having the same software imagecontent classifications.
 5. The computer program product of claim 4,wherein the computer-usable program code for determining the softwareimage content classification for each of the plurality of virtualmachines, includes computer-usable program code for classifying avirtual machine based upon a common golden image used to create thevirtual machine.
 6. The computer program product of claim 1, wherein thefirst and second operating systems are different versions of the sameoperating system.
 7. The computer program product of claim 1, furthercomprising: calculating an amount of common memory pages that wouldresult from moving a workload of the first virtual machine from a firstoperating system to a second operating system that is used by a workloadof a second virtual machine; and automatically moving the workload tothe second operating system in response to the calculated amount ofcommon memory pages exceeding the threshold amount.
 8. The computerprogram product of claim 3, wherein the software image contentclassification for each of the plurality of virtual machines is selectedfrom computer-aided design programs, database search engines, andspreadsheets.